package com.genius.reservation.tools;

import cn.hutool.core.img.ImgUtil;
import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.extra.qrcode.QrConfig;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;

public class QRcodeTools {
    public  static String createQRcode(String content){
        QrConfig qrConfig = new QrConfig(500,500);
        qrConfig.setErrorCorrection(ErrorCorrectionLevel.L);
        return QrCodeUtil.generateAsBase64(content, qrConfig, ImgUtil.IMAGE_TYPE_PNG);
    }
}
